package cn.jeefast.resthz.webservice;


import org.springside.modules.security.utils.Digests;
import org.springside.modules.utils.Encodes;

public class Encryption {
	public static final int HASH_INTERATIONS = 1024;
	public static String getEncryptPassword(String passWord, String salt) {
		byte[] hashPassword = Digests.sha1(passWord.getBytes(),
				Encodes.decodeHex(Encodes.encodeHex(salt.getBytes())),
				HASH_INTERATIONS);
		String checkPwd = Encodes.encodeHex(hashPassword);
		return checkPwd;
	}
}
